package grape.attend.rest.overtime.form;
import grape.common.rest.form.BaseForm;

import grape.common.rest.validation.props.PropValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
 * <p>
 * 加班休息日设置表
 * </p>
 *
 * @author yangwei
 * @since 2020-05-09
 */
@PropValid
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="加班休息日设置添加表单对象")
public class OvertimeRestCreateForm extends BaseForm {

    private static final long serialVersionUID = 1L;

    @NotEmpty(message="名称不能为空")
    @ApiModelProperty(value = "名称",required = true)
    private String name;

    @NotNull(message="是否允许加班不能为空")
    @ApiModelProperty(value = "是否允许加班",required = true)
    private Boolean isAllowOvertime;

    @PropValid.DependCondition(message = "加班是否需要审批不能为空", dependProp = "isAllowOvertime",ifEqual = "true")
    @ApiModelProperty(value = "加班是否需要审批",required = true)
    private Boolean isApprove;

    @PropValid.DependCondition(message = "是否扣除休息时间不能为空", dependProp = "isAllowOvertime",ifEqual = "true")
    @ApiModelProperty(value = "是否扣除休息时间",required = true)
    private Boolean isDeductRestTime;

    @PropValid.DependCondition(message = "休息时长分钟数不能为空", dependProp = "isAllowOvertime",ifEqual = "true")
    @ApiModelProperty(value = "休息时长分钟数",required = true)
    private Integer restTime;


    @ApiModelProperty(value = "最少加班（分）")
    private Integer atLeast;

    @ApiModelProperty(value = "最多加班（分）")
    private Integer atMost;

    @ApiModelProperty(value = "加班步长")
    private Integer step;

    @ApiModelProperty(value = "备注")
    private String remark;



}
